mth_1 = int(input('输入上月月份：'))
num_1 = int(input("请输入上月电表读数："))
if num_1 <= 200:
    print(f"上月电费为", 0.588 * num_1)
else:
    if mth_1 in (3, 4, 5, 9, 10, 11):
        if num_1 <= 350:
            print(f"上月电费为", 0.638 * num_1, "元")
        else:
            print(f"上月电费为", 0.888 * num_1, "元")
    else:
        if num_1 <= 450:
            print(f"上月电费为", 0.638 * num_1, "元")
        else:
            print(f"上月电费为", 0.888 * num_1, "元")
mth_2 = int(input('输入本月月份:'))
num_2 = int(input("请输入本月电表读数:"))
if num_2 <= 200:
    print(f"本月电费为", 0.588 * num_2, "元")
else:
    if mth_1 in (3, 4, 5, 9, 10, 11):
        if num_2 <= 350:
            print(f"本月电费为", 0.638 * num_2, "元")
        else:
            print(f"本月电费为", 0.888 * num_2, "元")
    else:
        if num_2 <= 450:
            print(f"本月电费为", 0.638 * num_2, "元")
        else:
            print(f"本月电费为", 0.888 * num_2, "元")
